package mirkofrancuski.battleship.game;

public enum Cell {
	MISS, HIT, DESTROYER, SUBMARINE, BATTLESHIP, AIRCRAFT_CARRIER, CRUISER, EMPTY;

	public static Cell getCell(int state) {
		switch (state) {
		case 0:
			return MISS;
		case 1:
			return HIT;
		case 2:
			return DESTROYER;
		case 3:
			return SUBMARINE;
		case 4:
			return BATTLESHIP;
		case 5:
			return AIRCRAFT_CARRIER;
		case 6:
			return CRUISER;
		}
		return EMPTY;
	}

	public int getSize() {
		if (this.equals(Cell.CRUISER))
			return 3;
		return this.ordinal();
	}
}
